<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>demo</title>
	<style type="text/css">
		.box{
			width: 400px;
			height: 400px;
			background-color: pink;
			/*border-radius: 50%;*/

		}
		.xbox{
			width: 100px;
			height: 100px;
			background-color: red;
			/*border-radius: 50%;*/
		}
	</style>
	<script type="text/javascript">
		window.onload=function(){
			box=document.getElementsByClassName("box");
			xbox=document.getElementsByClassName("xbox");
			x=0;
			box[0].onclick =function (){
				if(x==0){
					console.log(xbox)
					xbox[0].style.display="none";
					con=xbox[0].innerHTML;
					box[0].innerHTML=con;
					x=1
				}else{
					console.log(xbox)
					xbox[0].style.display="block";
					box[0].innerHTML="";
					x=0;
				}
				// box[0].style.width="200px";
				// box[0].style.height="200px";

			}
		
		}
		
	</script>
</head>
<body>
	<div class="box">
		
		
	</div>
	<div class="xbox">aaaaaaaa</div>
</body>
</html>